package io.renren.modules.api.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.api.dao.ApiInfoDao;
import io.renren.modules.api.dto.ApiInfoDTO;
import io.renren.modules.api.entity.ApiInfoEntity;
import io.renren.modules.api.service.ApiInfoService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * api接口
 *
 * @author zdx sunlightcs@gmail.com
 * @since 1.0.0 2023-03-19
 */
@Service
public class ApiInfoServiceImpl extends CrudServiceImpl<ApiInfoDao, ApiInfoEntity, ApiInfoDTO> implements ApiInfoService {

    @Override
    public QueryWrapper<ApiInfoEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<ApiInfoEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }


}